import Mock from 'mockjs'
import homeApi from './mockData/home'
import userApi from './mockData/user'
import permission from './mockData/permission'
import tree from './mockData/tree'
import noticeApi from './mockData/notice'
// 1.拦截的路径，2方法，3制造假数据
Mock.mock(/api\/home\/getTableData/,"get",homeApi.getTableData)
Mock.mock(/api\/home\/getCountData/,"get",homeApi.getCountData)
Mock.mock(/home\/getChartData/,"get", homeApi.getChartData)
// userApi
Mock.mock(/user\/getUserData/,"get", userApi.getUserList)
Mock.mock(/user\/deleteUser/,"get", userApi.deleteUser)
Mock.mock(/user\/addUser/,"post", userApi.createUser)
Mock.mock(/user\/editUser/, "post",userApi.updateUser)
Mock.mock(/permission\/getMenu/, "post",permission.getMenu)
// 测试tree
Mock.mock(/tree\/gettreeData/, "get",tree.gettreeData)

// 获取、编辑、增加、删除
Mock.mock(/api\/notice\/postNotice/, "post",noticeApi.getNoticeList)
// 增加
Mock.mock(/api\/notice\/addNotice/, "post",noticeApi.addNoticeList)
// 删除
Mock.mock(/api\/notice\/delNotice/, "post",noticeApi.delNoticeList)
// 编辑
Mock.mock(/api\/notice\/editNotice/, "post",noticeApi.editNoticeList)